<%@ page contentType="text/xml;charset=UTF-8" language="java"%>
<%@ page import="java.util.List"%>
<%@ page import="org.dualr.litelog.entity.Post"%>
<%@ page import="org.dualr.litelog.utils.LiteLogUtil"%>
<%
	String url = "";
	url = LiteLogUtil.getInstance().getPropsValue("/litelog.properties", "litelog.url");
%>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
  <url>
    <loc><%=url%></loc>
    <lastmod><%=request.getAttribute("date")%></lastmod>
    <changefreq>always</changefreq>
    <priority>1.0</priority>
  </url>
  <url>
    <loc><%=url%>/about.html</loc>
    <lastmod><%=request.getAttribute("date")%></lastmod>
    <changefreq>always</changefreq>
    <priority>0.8</priority>
  </url>
<%
if (request.getAttribute("PostList") != null){
	List<Post> postList = (List<Post>) request.getAttribute("PostList");
	for(Post post : postList){
		%>
		  <url>
		  <loc><%=url%>/post?method=view&amp;id=<%=post.getId()%></loc>
		  <lastmod><%=request.getAttribute("date")%></lastmod>
		  <changefreq>daily</changefreq>
		  <priority>0.8</priority>
		  </url>
		<%
	}
}
%>
</urlset>
